devvit-mcp-msw

0.6.10 • Public • Published

devvit-mcp

A companion MCP server to help write applications for Reddit's Developer Platform.

Usage

Add the following to your mcp.json for the editor or LLM of choice.

{
  "mcpServers": {
    "devvit-mcp": {
      "command": "npx",
      "args": ["-y", "devvit-mcp-msw"],
      "env": {
        "OPENAI_API_KEY": "...."
      }
    }
  }
}

To use the search function you will need an OpenAI API key.

Getting started

Developing

git clone ...

cd devvit-mcp-msw

nvm use

npm install

npm dev

Credits

Huge thanks to Arabold for open sourcing docs-mcp-server. Portions of this code is heavily inspired by this library. Please use it if you need other docs servers!

Thank you to the Playwright team as well. Amazing piece of tech and really solid MCP!

MCP Gotchas

  • Never put a console.log in the hot patch of your app if you're trying to debug. You'll see weird error messages like Unexpected token 'a', " at Anthrop"... is not valid JSON. This is because MCP is a contract over top to stdio and log messages write strings to there.
  • Only log console.error in your MCP when running through MCP.

Debugging

  • I've found that debugging is mostly broken in Cursor. I can't 'even find out how to add MCP to Windsurf. The best debugging experience I've had is using Claude desktop and connecting the MCP there. They have log files that report errors on your machine. You can view them by opening in VSCode or running tail commands.
  • You can also try the inspector by running: npx @modelcontextprotocol/inspector node /Users/marcus.wood/burners/devvit-mcp/dist/server.js (automatically called with npm run dev) and then going to http://127.0.0.1:6274/. This lets you run tool calls and stuff which is pretty neat See here for more details.
  • This article and the forum appears to have valuable stuff: https://forum.cursor.com/t/mcp-logging-issue/57577/3
  • If you see something like this:
Error: Server does not support logging (required for notifications/message)
    at Server.assertNotificationCapability

You need to add the capability to your new MCPServer. Use this permalink to know what key you should add.

  • If you use Claude desktop to debug, do this:
    1. Make sure you build the project
    2. Close the Claude Desktop app
    3. Go to a terminal and run tail -n 20 -F ~/Library/Logs/Claude/mcp*.log
    4. Reopen Claude (I've found that cmd + r will refresh things nicely most of the time)
    5. Open it

Playing with Roo

If you're trying to integrate this with roo you may hit this error: MCP hub not available. This actually has to do with the location of Roo. Restarting VSCode should fix it.

Readme

Keywords

none

Package Sidebar

Install

npm i devvit-mcp-msw

Weekly Downloads

5

Version

0.6.10

License

BSD-3-Clause

Unpacked Size

47.1 MB

Total Files

1559

Last publish

Collaborators

  • marcuswood23